:root {
    --vino: #55001D;
    --dorado: #C89C67;
    --gris-claro: #F5F5F5;
    --gris-texto: #333333;
    --sombra-suave: 0 4px 10px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
/*Ajusta este valor (180px o 100px) dependiendo de cuánto mida de alto 
       tu header fijo en escritorio, así la tarjeta no se esconde debajo del menú */
/*html {
    scroll-behavior: smooth;
     
    scroll-padding-top: 190px; 
}*/

body {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    color: var(--gris-texto);
    line-height: 1.6;
    /* Ajuste dinámico para el header fijo */
    padding-top: 20px;
}

/* HEADER */
header {
    background-color: var(--vino);
    color: #ffffff;
    padding: 10px 0;
    position: relative;
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    gap: 15px;
}

.header-container img {
    max-width: 220px;
    width: 100%;
    height: auto;
    flex-shrink: 0;
}

.header-container h1 {
    font-size: 1.8rem;
    text-align: center;
    flex-grow: 1;
}

/* Botón hamburguesa oculto en desktop */
.mobile-burger {
    display: none;
}

/* NAV ESCRITORIO */
nav {
    background-color: #ffffff;
    border-bottom: 3px solid var(--dorado);
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
}

nav ul li a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--vino);
    font-weight: bold;
}

/* Submenús: ocultos por defecto, dropdown al pasar el ratón */
nav>ul>li {
    position: relative;
}

nav .submenu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 220px;
    background: #fff;
    box-shadow: var(--sombra-suave);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-top: 3px solid var(--dorado);
    list-style: none;
    padding: 0;
    margin: 0;
    flex-direction: column;
    z-index: 100;
}

nav>ul>li:hover>.submenu {
    display: flex;
}

/* Submenús anidados (nivel 2, 3...) */
nav .submenu .submenu {
    left: 100%;
    top: 0;
    margin-top: 0;
}

nav .submenu li {
    position: relative;
}

nav .submenu li:hover>.submenu {
    display: flex;
}

/* Ocultar menú móvil en escritorio (evita menú duplicado) */
.mobile-drawer,
.mobile-overlay {
    display: none;
}

/* FIXED TOP */
.fixed-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

/* SLIDER: imagen completa, sin recortes, espacio alrededor y que no se corte arriba */
.landing-slider {
    position: relative;
    width: calc(100% - 3rem);
    max-width: 1100px;
    max-height: 75vh;
    margin: 1rem auto;
    overflow: hidden;
    background: var(--vino);
    border-radius: 6px;
    padding-top: 6px;
    /* evita que se corte la parte superior de la imagen */
}

.landing-slider img {
    display: none;
    width: 100%;
    height: auto;
    max-height: 75vh;
    object-fit: contain;
    object-position: center top;
    /* prioriza que se vea la parte de arriba */
    vertical-align: top;
}

.landing-slider img.active {
    display: block;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    border-radius: 4px;
    transition: background 0.2s;
}

.slider-btn:hover {
    background: rgba(0, 0, 0, 0.6);
}

.slider-btn.prev {
    left: 8px;
}

.slider-btn.next {
    right: 8px;
}

/* CONTENEDOR Y SECCIONES (espacio arriba de la tarjeta: Línea 3, Oda de Hierro, Centro Acuático, Naucalli) */
.contenedor {
    margin: 40px auto;
    max-width: 1100px;
    padding: 0 20px;
    text-align: justify;
}

.contenedor.espacio-mitad {
    margin-top: 20px;
}

/* Arcos: mitad de espacio arriba */
section {
    background-color: #ffffff;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: var(--sombra-suave);
    border-left: 6px solid var(--vino);
    text-align: justify;
}

/* Imágenes dentro del contenido: siempre contenidas, sin desbordar */
.contenedor img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

.contenedor section h2,
.contenedor section h3,
.contenedor section p {
    text-align: justify;
}

/* Layout 40/60: Centro Acuático, Mexicable, etc. */
.mexicable-layout {
    display: grid;
    grid-template-columns: 40% 1fr;
    gap: 24px;
    align-items: start;
    margin: 12px 0;
}

.mexicable-img {
    overflow: hidden;
    border-radius: 6px;
    background: var(--gris-claro);
}

.mexicable-img img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

/* Imagen a 1/3 del ancho (ej. espacios.html) */
.mexicable-img.img-un-tercio {
    max-width: 33.333%;
}

.mexicable-texto {
    min-width: 0;
}

.mexicable-texto p {
    margin: 0 0 1em;
    text-align: left;
}

/* Layout tipo card: Parque Naucalli, Oda de Hierro, etc. */
.torneo-layout {
    display: grid;
    grid-template-columns: 40% 1fr;
    gap: 24px;
    align-items: start;
    margin: 0 0 10px 0;
}

.torneo-layout+p,
.torneo-layout+h3,
.mexicable-layout+p,
.mexicable-layout+h3 {
    margin-top: 0.5em;
}

.torneo-img {
    overflow: hidden;
    border-radius: 6px;
    background: var(--gris-claro);
}

.torneo-img img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

.torneo-texto {
    min-width: 0;
}

.torneo-texto h2 {
    margin: 0 0 0.5em;
    text-align: left;
}

.torneo-texto p {
    margin: 0 0 1em;
    text-align: left;
}

@media (max-width: 768px) {

    .mexicable-layout,
    .torneo-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    body {
        padding-top: 100px;
    }

    .header-container h1 {
        display: none;
    }

    .header-container {
        justify-content: center;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding-top: 10px;
    }

    .fixed-top {
        position: absolute;
    }
}

/* ==========================================================================
   ARQUITECTURA COMPLEMENTARIA: MAPA INTERACTIVO DE TURISMO
   ========================================================================== */

/* Anulación del layout restrictivo heredado para la sección del mapa */
.contenedor .torneo-img.mapa-turistico-forzado {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    background: transparent !important;
    margin-bottom: 25px;
}

.turismo-contenedor-mapa {
    position: relative;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.turismo-contenedor-mapa * {
    box-sizing: border-box;
}

/* Lienzo y Mapa de Fondo */
.turismo-contenedor-mapa .mapa-wrapper {
    position: relative;
    width: 100%;
    background-image: url('./Ruta%20Tur%C3%ADstica%20_%20Mundial%20Social%20Naucalpan%202026_files/Ruta%20Tur%C3%ADstica.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 8px;
    box-shadow: var(--sombra-suave);
    border: 2px solid var(--vino);
}

/* Forzado de Relación de Aspecto Responsiva Basada en viewBox */
.turismo-contenedor-mapa .mapa-svg {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
}

/* ==========================================================================
   GEOMETRÍA Y EFECTOS DE LOS PINES
   ========================================================================== */

.turismo-contenedor-mapa .pin-marcador {
    position: absolute;
    width: 24px;
    height: 24px;
    /* Mantiene el anclaje en la punta inferior del pin */
    transform: translate(-50%, -100%); 
    cursor: pointer;
    z-index: 10;
    /* Agregamos el transform-origin abajo para que crezca hacia arriba sin moverse de la calle */
    transform-origin: bottom center;
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), filter 0.2s ease;
}

/* Hover e Interactividad Activa con Sombra Dorada e Incremento de Tamaño */
.turismo-contenedor-mapa .pin-marcador:hover,
.turismo-contenedor-mapa .pin-marcador.active {
    /* MODIFICADO: Mantiene el translate original y le añade el scale(1.3) para agrandarlo */
    transform: translate(-50%, -100%) scale(1.3);
    filter: drop-shadow(0px 6px 12px var(--dorado));
    z-index: 30;
}

.turismo-contenedor-mapa .pin-marcador svg {
    width: 100%;
    height: 100%;
    display: block;
    /* NUEVO: Transición suave para que el cambio de guinda a dorado no sea de golpe */
    transition: fill 0.2s ease; 
}

/* NUEVO: Intercepta el SVG interno cuando el marcador está activo o en hover para pintarlo de dorado */
.turismo-contenedor-mapa .pin-marcador:hover svg,
.turismo-contenedor-mapa .pin-marcador.active svg {
    fill: #D4AF37 !important; /* Color dorado metálico */
}

/* Numeración Dinámica sobre el Pin */
.turismo-contenedor-mapa .pin-numero {
    position: absolute;
    top: 32%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: bold;
    color: #FFFFFF;
    font-family: 'Montserrat', Arial, sans-serif;
    pointer-events: none;
    /* NUEVO: Por si quieres que el número cambie de color al volverse dorado (opcional) */
    transition: color 0.2s ease; 
}

/* Miniature Circular de Assets (Requerimiento 3) */
.turismo-contenedor-mapa .pin-thumb-mini {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    pointer-events: none;
    z-index: -1;
}
/* ==========================================================================
   SISTEMA DE VENTANAS EMERGENTES (POP-UP LADO DEL CATÁLOGO)
   ========================================================================== */

/* ==========================================================================
   POP-UP FLOTANTE GLOBAL CENTRADO PERFECTO
   ========================================================================== */
.turismo-popup {
    /* Quitamos el fixed por defecto en escritorio para usar absolute global */
    position: absolute; 
    z-index: 99999 !important;
    
    width: 320px; 
    max-width: 90vw;

    /* Importante: Dejar estas propiedades limpias porque JS las sobreescribirá en vivo */
    top: 0;
    left: 0;
    transform: none;

    /* CONTROL DE ALTURA INTERNA */
    /* Como ahora se posiciona más abajo, un max-height evita desbordes raros */
    max-height: 450px; 
    overflow-y: auto; 

    /* ESTILO VISUAL DE LA TARJETA */
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(85, 0, 29, 0.15);
    transition: opacity 0.2s ease;
    pointer-events: auto;
}

/* Estado oculto riguroso */
.turismo-popup.hidden {
    display: none !important;
}

.popup-content {
    position: relative;
    padding: 16px;
}

.popup-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #888888;
    line-height: 1;
    z-index: 5;
}

.popup-close:hover {
    color: var(--vino);
}

.popup-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.popup-main-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
}

.popup-info h3 {
    margin: 0 0 6px 0;
    font-size: 16px;
    color: var(--vino);
    font-weight: 700;
}

.popup-info p {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: var(--gris-texto);
    line-height: 1.4;
}

/* Contenedor Automatizado de Códigos QR */
.popup-qr-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--gris-claro, #f5f5f5);
    padding: 8px;
    border-radius: 6px;
    margin: 12px 0;
    border-left: 3.5px solid var(--dorado, #C89C67);
}

/* El cuadro del QR */
#popup-qr {
    width: 70px;
    height: 70px;
    background: #ffffff;
    padding: 3px;
    border: 1px solid #ddd;
    box-sizing: border-box;
}

/* Texto explicativo del QR */
.popup-qr-container span {
    font-size: 11px;
    color: #444444;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
}

.popup-btn {
    display: block;
    text-align: center;
    background: var(--vino);
    color: #FFFFFF;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.2s;
}

.popup-btn:hover {
    background: #3d0015;
}

/* ==========================================================================
   OPTIMIZACIÓN CATÁLOGO TURÍSTICO: LAYOUT 5x10 & NO-PARPADEO
   ========================================================================== */

/* Layout Principal en Grid */
.dashboard-turismo {
    position: relative; /* Indispensable para que el cálculo absoluto tome este contenedor como origen */
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 20px;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}

@media (max-width: 900px) {
    .dashboard-turismo {
        grid-template-columns: 1fr;
    }
    .turismo-popup {
        position: fixed; /* En móviles es mejor que se comporte como modal modal fijo abajo */
        bottom: 20px;
        left: 50% !important;
        top: auto !important;
        transform: translateX(-50%);
        width: calc(100% - 40px);
        max-width: 360px;
    }
    .turismo-popup.hidden {
        transform: translate(-50%, 20px);
    }
}

/* Contenedor de la Lista Lateral */
.zona-catalogo-lista {
    background: #ffffff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: var(--sombra-suave);
    max-height: 75vh;
    overflow-y: auto;
    border-top: 4px solid var(--vino);
}

.zona-catalogo-lista h2 {
    font-size: 1.4rem;
    color: var(--vino);
    margin-bottom: 15px;
    text-align: center;
    font-weight: 700;
}

/* ==========================================================================
   DISEÑO FINAL DE ICONOS CON IMÁGENES REALES Y NÚMEROS GRANDES
   ========================================================================== */

/* Grid de 5 Columnas */
.grid-tarjetas-turismo {
    display: grid;
    grid-template-columns: repeat(5, 1fr); 
    gap: 12px;
}

.tarjeta-item-turismo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 5px;
    background: var(--gris-claro);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    box-sizing: border-box;
}

/* CONTENEDOR CIRCULAR PARA LA FOTO */
.tarjeta-item-turismo .thumb-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 8px;
    border-radius: 50%;
    border: 2px solid var(--vino);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ajuste de la foto real dentro del círculo */
.tarjeta-item-turismo .thumb-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* EL BADGE DEL NÚMERO SE QUEDA FLOTANDO EN LA ESQUINA DEL CÍRCULO */
.tarjeta-item-turismo .badge-numero {
    position: absolute;
    top: -4px;
    left: -4px;
    background: var(--vino);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #ffffff;
    z-index: 3;
    font-family: Arial, sans-serif;
}

.tarjeta-item-turismo span.nombre-punto {
    font-size: 10px;
    font-weight: 700;
    color: var(--gris-texto);
    line-height: 1.2;
}

/* ==== ESTADOS DE ENFOQUE CRUZADO ==== */
.tarjeta-item-turismo:hover,
.tarjeta-item-turismo.item-resaltado {
    background: #ffffff;
    border-color: var(--dorado);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.tarjeta-item-turismo.item-resaltado .badge-numero {
    background: var(--dorado);
    color: var(--vino);
}

/* ==========================================================================
   CARRUSEL OPTIMIZADO - MUNDIAL SOCIAL NAUCALPAN 2026
   ========================================================================== */

/* 1. Sección Principal (Contenedor externo de pantalla completa) */
.carrusel-seccion {
    position: relative;
    width: 100%;
    max-width: 1700px;
    margin: 50px auto 30px auto;
    overflow: hidden;
    background-color: var(--gris-fondo);
}

/* 2. Contenedor de Proporciones */
.carrusel-contenedor {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 1; /* Banner semi-panorámico */
    border-radius: 20px;   /* Esquinas redondeadas unificadas */
}

/* 3. Control de Slides Individuales */
.carrusel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    z-index: 1;
    
    /* Flexbox para centrar la imagen y el texto */
    display: flex;
    justify-content: center; 
}

.carrusel-slide.activo {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* 4. Ajuste del Contenido (Imagen Ajustable) */
.carrusel-img {
    /* MODIFICA ESTE ANCHO: Define qué tan angosta quieres la foto dentro del bloque */
    width: 100%;                /* Ejemplo: 75% para que se reduzcan los lados */
    max-width: 1200px;          /* Límite estético para pantallas grandes */
    
    height: 100%;
    object-fit: cover;         /* Evita la deformación de las fotos de los monumentos */
    object-position: center;
    display: block;
}


/* 6. Botones de Navegación Inteligentes (Flechas) */
.carrusel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    z-index: 4;
    transition: background-color 0.3s;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    background-color: rgba(85, 0, 29, 0.6);
}

.carrusel-btn:hover {
    background-color: rgba(200, 156, 103, 0.6);
}

/* Las flechas se posicionan respecto al borde de la IMAGEN ANGOSTA, 
   no de la pantalla, usando la matemática del porcentaje invertido.
*/
.carrusel-btn.prev { left: 12%; }  /* Ajusta este % si cambias el ancho de la foto */
.carrusel-btn.next { right: 12%; } /* Ajusta este % si cambias el ancho de la foto */

/* ==========================================================================
   MEDIA QUERY: AJUSTE PARA DISPOSITIVOS MÓVILES (Pantallas <= 900px)
   ========================================================================== */
@media (max-width: 900px) {
  .carrusel-contenedor {
    aspect-ratio: 16 / 9; 
    height: auto !important;
  }
  .carrusel-img {
    width: 100% !important;
    height: 100% !important;
    /* object-fit: contain evita que el mapa y logos se corten en los bordes */
    object-fit: contain !important; 
    background-color: var(--gris-fondo); /* Color de fondo opcional por si quedan franjas */
  }
  
  .carrusel-info {
    padding: 20px 5%;
  }

  .carrusel-info h3 {
    font-size: 18px;
  }
  
  .carrusel-info p {
    font-size: 13px;
  }

  .carrusel-btn {
    width: 40px;
    height: 40px;
    padding: 10px;
    font-size: 14px;
  }
}


/*Tabla*/
/* Contenedor con scroll para evitar desbordes en celulares */
.tabla-responsiva-contenedor {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 4px;
    border: 1px solid var(--gris-claro); /* Borde sutil exterior */
}


/* Resaltado para la columna numérica */
.col-numero {
    font-weight: bold;
    color: var(--vino);
    width: 60px;
    text-align: center !important; /* Centra el número para mejor orden */
}

/* Formato limpio para las coordenadas */
.coordenadas-texto {
    font-family: monospace;
    font-size: 13px;
    color: #555555;
    white-space: nowrap; /* Evita que la coordenada se rompa en dos renglones */
}